package com.numberone.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.numberone.system.mapper.ShopCollectMapper;
import com.numberone.system.domain.ShopCollect;
import com.numberone.system.service.IShopCollectService;
import com.numberone.common.support.Convert;

/**
 * 店铺收藏 服务层实现
 * 
 * @author numberone
 * @date 2020-10-10
 */
@Service
public class ShopCollectServiceImpl implements IShopCollectService 
{
	@Autowired
	private ShopCollectMapper shopCollectMapper;

	/**
     * 查询店铺收藏信息
     * 
     * @param id 店铺收藏ID
     * @return 店铺收藏信息
     */
    @Override
	public ShopCollect selectShopCollectById(Long id)
	{
	    return shopCollectMapper.selectShopCollectById(id);
	}
	
	/**
     * 查询店铺收藏列表
     * 
     * @param shopCollect 店铺收藏信息
     * @return 店铺收藏集合
     */
	@Override
	public List<ShopCollect> selectShopCollectList(ShopCollect shopCollect)
	{
	    return shopCollectMapper.selectShopCollectList(shopCollect);
	}
	
    /**
     * 新增店铺收藏
     * 
     * @param shopCollect 店铺收藏信息
     * @return 结果
     */
	@Override
	public int insertShopCollect(ShopCollect shopCollect)
	{
	    return shopCollectMapper.insertShopCollect(shopCollect);
	}
	
	/**
     * 修改店铺收藏
     * 
     * @param shopCollect 店铺收藏信息
     * @return 结果
     */
	@Override
	public int updateShopCollect(ShopCollect shopCollect)
	{
	    return shopCollectMapper.updateShopCollect(shopCollect);
	}

	/**
     * 删除店铺收藏对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteShopCollectByIds(String ids)
	{
		return shopCollectMapper.deleteShopCollectByIds(Convert.toStrArray(ids));
	}
	
}
